﻿using JHECIS.DataModel.Enum;
using MS.Common.Extension;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;

namespace JHECIS.BLL.Triage.Common
{
    public class OutDeptValueConvert : IValueConverter
    {
        /// <summary>
        /// 在线状态转换文字  袁凤超 2022-03-28
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType"></param>
        /// <param name="parameter"></param>
        /// <param name="culture"></param>
        /// <returns></returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
                return DependencyProperty.UnsetValue;
            //OutDeptTypeEnum outDeptTypeEnum=(OutDeptTypeEnum)value;
            //return outDeptTypeEnum.GetDescription();

            if (value.ToString().Equals("0"))
            {
                return "出科";
            }
            else if (value.ToString().Equals("1"))
            {
                return "死亡";
            }
            else if (value.ToString().Equals("2"))
            {
                return "转院";
            }
            else if (value.ToString().Equals("3"))
            {
                return "转住院";
            }
            else if (value.ToString().Equals("4"))
            {
                return "其他";
            }
            else if (value.ToString().Equals("5"))
            {
                return "手术室";
            }
            else
            {
                return "";
            }
        }
        /// <summary>
        /// 接口实现 袁凤超 2022-03-28
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType"></param>
        /// <param name="parameter"></param>
        /// <param name="culture"></param>
        /// <returns></returns>
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return string.Empty;
        }
    }
}
